<?php
include("../contents.php");
include("../security.php");
include("../settings.php");
include("../database.php");
include("../i18n.php");
$get_user_pref=mysql_query("SELECT id FROM ". $GLOBALS["db_pref"] ."users WHERE id='". $_SESSION["userid"] ."' and global_verwaltung='1'");
if (mysql_num_rows($get_user_pref)!=1) {
	header("Location:/");
	exit();
}

if (!empty($_GET["deluser"])) {
	mysql_query("DELETE FROM ". $GLOBALS["db_pref"] ."users WHERE id='". $_GET["deluser"] ."'");
}

if (!empty($_GET["delgroup"])) {
	mysql_query("DELETE FROM ". $GLOBALS["db_pref"] ."groups WHERE id='". $_GET["delgroup"] ."'");
}

if(!empty($_POST["groupname"]) && !isset($_GET["editgroup"])) {
	$group_exists=mysql_query("SELECT id FROM ". $GLOBALS["db_pref"] ."groups WHERE name='". $_POST["groupname"] ."'");
	if (mysql_num_rows($group_exists)==0) {
		mysql_query("INSERT INTO ". $GLOBALS["db_pref"] ."groups SET name='". $_POST["groupname"] ."', login='". $_POST["login"] ."', content='". $_POST["content"] ."', content_dir_add='". $_POST["content_dir_add"] ."', content_dir_rename='". $_POST["content_dir_rename"] ."', content_dir_delete='". $_POST["content_dir_delete"] ."', content_add='". $_POST["content_add"] ."', content_delete='". $_POST["content_delete"] ."', navigation='". $_POST["navigation"] ."', navigation_add='". $_POST["navigation_add"] ."', navigation_rename='". $_POST["navigation_rename"] ."', navigation_delete='". $_POST["navigation_delete"] ."', verwaltung='". $_POST["verwaltung"] ."', verwaltung_cache='". $_POST["verwaltung_cache"] ."', verwaltung_media='". $_POST["verwaltung_media"] ."', verwaltung_settings='". $_POST["verwaltung_settings"] ."', verwaltung_webusers='". $_POST["verwaltung_webusers"] ."'");
	} else {
		?>
		<script language="JavaScript" type="text/javascript">
		alert("<?php
		echo gettxt("Group already exists");
		// Dieser Gruppenname existiert bereits.
		?>");
		</script>
		<?php
	}
}

$editgroup=0;

if(!empty($_GET["editgroup"])) {
	if(!empty($_POST["groupname"])) {
		mysql_query("UPDATE ". $GLOBALS["db_pref"] ."groups SET name='". $_POST["groupname"] ."', login='". $_POST["login"] ."', content='". $_POST["content"] ."', content_dir_add='". $_POST["content_dir_add"] ."', content_dir_rename='". $_POST["content_dir_rename"] ."', content_dir_delete='". $_POST["content_dir_delete"] ."', content_add='". $_POST["content_add"] ."', content_delete='". $_POST["content_delete"] ."', navigation='". $_POST["navigation"] ."', navigation_add='". $_POST["navigation_add"] ."', navigation_rename='". $_POST["navigation_rename"] ."', navigation_delete='". $_POST["navigation_delete"] ."', verwaltung='". $_POST["verwaltung"] ."', verwaltung_cache='". $_POST["verwaltung_cache"] ."', verwaltung_media='". $_POST["verwaltung_media"] ."', verwaltung_settings='". $_POST["verwaltung_settings"] ."', verwaltung_webusers='". $_POST["verwaltung_webusers"] ."' WHERE id='". $_GET["editgroup"] ."'");
		if (mysql_affected_rows()==1) {
			?>
			<script language="JavaScript" type="text/javascript">
			alert("Die Daten wurden erfolgreich gespeichert.");
			</script>
			<?php
		} else {
			?>
			<script language="JavaScript" type="text/javascript">
			alert("Es wurden keine Daten aktualisiert.");
			</script>
			<?php			
		}
	}
	
	
	$editagroup=mysql_query("SELECT * FROM ". $GLOBALS["db_pref"] ."groups WHERE id='". $_GET["editgroup"] ."'");
	if (mysql_num_rows($editagroup)==1) {
		$row_edit=mysql_fetch_object($editagroup);
		$editgroup=1;
	}
}


if(!empty($_POST["username"]) && !isset($_GET["edituser"])) {
	$user_exists=mysql_query("SELECT id FROM ". $GLOBALS["db_pref"] ."users WHERE username='". $_POST["username"] ."'");
	if (mysql_num_rows($user_exists)==0) {
		mysql_query("INSERT INTO ". $GLOBALS["db_pref"] ."users SET username='". $_POST["username"] ."', passwort='". $_POST["password"] ."', realname='". $_POST["realname"] ."', gruppe='". $_POST["gruppe"] ."', global_verwaltung='". $_POST["globalverwaltung"] ."'");
	} else {
		?>
		<script language="JavaScript" type="text/javascript">
		alert("Dieser Benutzername existiert bereits.");
		</script>
		<?php
	}
}

$edituser=0;
if(!empty($_GET["edituser"])) {
	if(!empty($_POST["username"])) {
		mysql_query("UPDATE ". $GLOBALS["db_pref"] ."users SET username='". $_POST["username"] ."', passwort='". $_POST["password"] ."', realname='". $_POST["realname"] ."', gruppe='". $_POST["gruppe"] ."', global_verwaltung='". $_POST["globalverwaltung"] ."' WHERE id='". $_GET["edituser"] ."'");
		if (mysql_affected_rows()==1) {
			?>
			<script language="JavaScript" type="text/javascript">
			alert("Die Daten wurden erfolgreich gespeichert.");
			</script>
			<?php
		} else {
			?>
			<script language="JavaScript" type="text/javascript">
			alert("Es wurden keine Daten aktualisiert.");
			</script>
			<?php			
		}
	}
	
	
	$editauser=mysql_query("SELECT * FROM ". $GLOBALS["db_pref"] ."users WHERE id='". $_GET["edituser"] ."'");
	if (mysql_num_rows($editauser)==1) {
		$row_edit=mysql_fetch_object($editauser);
		$edituser=1;
	}
}

echo "<"."?xml version=\"1.0\"?".">";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>Administration</title>
    <link media="screen" rel="stylesheet" href="css/style.css" type="text/css" />
    <script src="js/scripts.js" type="text/javascript"></script>
    </head>

    <body id="editgrey">
    	<div id="overview">
    	  <h1>Alle Benutzer &amp; Gruppen</h1>
    	  <img src="images/dir_symbol.gif" width="64" height="64" alt="" style="padding-right:20px;float:left;" />
    	  Bearbeiten Sie hier die Benutzer und die dazugeh&ouml;hrigen Gruppen.
    	  <br style="clear:both;" />
	    </div>
	    <div id="edit">
	    <p id="pageheadline">Benutzer</p>
    	<table style="width:100%;padding:0px; margin:0px;border-top:0px;border-left:1px solid #aaaaaa;border-right:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa; background-color:#ffffff" cellspacing="0" cellpadding="0">
    		<tr>
    			<th class="left" width="125" align="left"><?php echo gettxt("Username"); ?></th>
   				<th class="standard" align="left"><?php echo gettxt("Full Name"); ?></th>
   				<th class="standard" width="80" align="center"><?php echo gettxt("Edit"); ?></th>
   				<th class="standard" width="50" align="center"><?php echo gettxt("Delete"); ?></th>
    		</tr>
    		<?php
    		$query_users=mysql_query("SELECT id, username, realname FROM ". $GLOBALS["db_pref"] ."users order by username");
    		for ($i=0; $i<mysql_num_rows($query_users); $i++) {
    			$row_user=mysql_fetch_object($query_users);
    			?>
    			<tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    				<td class="tdnormal"><?php echo $row_user->username; ?></td>
    				<td class="tdnormal"><?php echo $row_user->realname; ?></td>
    				<td class="tdnormal" style="text-align:center;"><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?edituser=<?php echo $row_user->id; ?>"><img src="images/edit.gif" style="border:0px;width:12px;height:16px;" alt="<?php echo gettxt("Edit"); ?>" title="<?php echo gettxt("Edit"); ?>" /></a></td>
    				<td class="tdnormal" style="text-align:center;"><a href="javascript:askdelete('<?php echo $_SERVER["PHP_SELF"]; ?>?deluser=<?php echo $row_user->id; ?>')"><img src="images/delete_small.gif" style="border:0px;width:14px;height:14px;" alt="<?php echo gettxt("Delete"); ?>" title="<?php echo gettxt("Delete"); ?>" /></a></td>
    			</tr>
    			<?php
    		}
    		?>
    	</table><br />
    	<p id="pageheadline2"><?php echo gettxt("Edit User"); ?></p>
    	<form action="<?php echo $_SERVER["PHP_SELF"]; echo ($edituser==1)?"?edituser=". $row_edit->id :"";?>" method="post">
    	  <table style="width:100%;padding:0px; margin:0px;border-top:0px;border-left:1px solid #aaaaaa;border-right:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa; background-color:#ffffff" cellpadding="0" cellspacing="0">
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" width="200" style="padding:5px;"><?php echo gettxt("Username"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;"><input type="text" name="username" value="<?php echo ($edituser==1)?$row_edit->username :"";?>" /></td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Password"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;"><input type="<?php echo (isset($_GET["showpass"]))?"text":"password"; ?>" name="password" value="<?php echo ($edituser==1)?$row_edit->passwort :"";?>" /> <?php if ($edituser==1) { ?><a href="<?php echo $_SERVER["PHP_SELF"] ."?edituser=". $row_edit->id; echo (isset($_GET["showpass"]))?"":"&showpass=1"; ?>" class="small">Passwort <?php echo (isset($_GET["showpass"]))?"verstecken":"anzeigen"; ?></a> <?php } ?></td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Full Name"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;"><input type="text" name="realname" value="<?php echo ($edituser==1)?$row_edit->realname :"";?>" /></td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Group"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	      	<select size="1" name="gruppe">
    	      	<?php
    			$query_groups=mysql_query("SELECT id, name FROM ". $GLOBALS["db_pref"] ."groups order by name");
    			for ($i=0; $i<mysql_num_rows($query_groups); $i++) {
    				$row_group=mysql_fetch_object($query_groups);
    			?>
    	      		<option value="<?php echo $row_group->id; ?>" <?php if($edituser==1 && $row_edit->gruppe==$row_group->id) { echo "selected=\"selected\"";} ?>><?php echo $row_group->name; ?></option>
    	      	<?php
    			}
    	      	?>
    	      	</select>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Global Settings"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($edituser==1 && $row_edit->global_verwaltung==1) { echo "checked=\"checked\" ";} ?>name="globalverwaltung" value="1" id="globalverwaltung_yes" /> <label for="globalverwaltung_yes">Ja</label>
    	        <input type="radio" <?php if($edituser==1 && $row_edit->global_verwaltung==0) { echo "checked=\"checked\" ";} ?>name="globalverwaltung" value="0" id="globalverwaltung_no" /> <label for="globalverwaltung_no">Nein</label>
    	      </td>
    	    </tr>
    	  </table><br />
    	  <input type="submit" value="Speichern" />
    	</form>
    	<br />
    	<p id="pageheadline"><?php echo gettxt("Groups"); ?></p>
    	<table style="width:100%;padding:0px; margin:0px;border-top:0px;border-left:1px solid #aaaaaa;border-right:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa; background-color:#ffffff" cellpadding="0" cellspacing="0">
    		<tr>
    			<th class="left" width="375" align="left"><?php echo gettxt("Name"); ?></th>
   				<th class="standard" width="75" align="center"><?php echo gettxt("Edit"); ?></th>
   				<th class="standard" width="50" align="center"><?php echo gettxt("Delete"); ?></th>
    		</tr>
    		<?php
    		$query_groups=mysql_query("SELECT id, name FROM ". $GLOBALS["db_pref"] ."groups order by name");
    		for ($i=0; $i<mysql_num_rows($query_groups); $i++) {
    			$row_group=mysql_fetch_object($query_groups);
    			?>
    			<tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    				<td class="tdnormal"><?php echo $row_group->name; ?></td>
    				<td class="tdnormal" style="text-align:center;"><a href="<?php echo $_SERVER["PHP_SELF"]; ?>?editgroup=<?php echo $row_group->id; ?>"><img src="images/edit.gif" style="border:0px;width:12px;height:16px;" alt="<?php echo gettxt("Edit"); ?>" title="<?php echo gettxt("Edit"); ?>" /></a></td>
    				<td class="tdnormal" style="text-align:center;"><a href="javascript:askdelete('<?php echo $_SERVER["PHP_SELF"]; ?>?delgroup=<?php echo $row_group->id; ?>')"><img src="images/delete_small.gif" style="border:0px;width:14px;height:14px;" alt="<?php echo gettxt("Delete"); ?>" title="<?php echo gettxt("Delete"); ?>" /></a></td>
    			</tr>
    			<?php
    		}
    		?>
    	</table>
    	<p id="pageheadline2"><?php echo gettxt("Edit Groups"); ?></p>
    	<form action="<?php echo $_SERVER["PHP_SELF"]; echo ($editgroup==1)?"?editgroup=". $row_edit->id :"";?>" method="post">
    	  <table style="width:100%;padding:0px; margin:0px;border-top:0px;border-left:1px solid #aaaaaa;border-right:1px solid #aaaaaa;border-bottom:1px solid #aaaaaa; background-color:#ffffff" cellpadding="0" cellspacing="0">
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;" width="200"><?php echo gettxt("Name"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;"><input type="text" name="groupname" value="<?php echo ($editgroup==1)?$row_edit->name :"";?>" /></td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Login"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->login==1) { echo "checked=\"checked\" ";} ?>name="login" value="1" id="login_yes" /> <label for="login_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->login==0) { echo "checked=\"checked\" ";} ?>name="login" value="0" id="login_no" /> <label for="login_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;">&nbsp;</td>
    	      <td class="tdnormal" style="padding-left:15px;">&nbsp;</td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px; font-weight:bold;"><?php echo gettxt("Content Area"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content==1) { echo "checked=\"checked\" ";} ?>name="content" value="1" id="content_yes" /> <label for="content_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content==0) { echo "checked=\"checked\" ";} ?>name="content" value="0" id="content_no" /> <label for="content_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Add Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_add ==1) { echo "checked=\"checked\" ";} ?>name="content_dir_add" value="1" id="content_dir_add_yes" /> <label for="content_dir_add_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_add ==0) { echo "checked=\"checked\" ";} ?>name="content_dir_add" value="0" id="content_dir_add_no" /> <label for="content_dir_add_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Rename Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_rename ==1) { echo "checked=\"checked\" ";} ?>name="content_dir_rename" value="1" id="content_dir_rename_yes" /> <label for="content_dir_rename_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_rename ==0) { echo "checked=\"checked\" ";} ?>name="content_dir_rename" value="0" id="content_dir_rename_no" /> <label for="content_dir_rename_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Delete Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_delete ==1) { echo "checked=\"checked\" ";} ?>name="content_dir_delete" value="1" id="content_dir_delete_yes" /> <label for="content_dir_delete_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_dir_delete ==0) { echo "checked=\"checked\" ";} ?>name="content_dir_delete" value="0" id="content_dir_delete_no" /> <label for="content_dir_delete_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Add Document"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_add ==1) { echo "checked=\"checked\" ";} ?>name="content_add" value="1" id="content_add_yes" /> <label for="content_add_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_add ==0) { echo "checked=\"checked\" ";} ?>name="content_add" value="0" id="content_add_no" /> <label for="content_add_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Delete Document"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_delete ==1) { echo "checked=\"checked\" ";} ?>name="content_delete" value="1" id="content_delete_yes" /> <label for="content_delete_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->content_delete ==0) { echo "checked=\"checked\" ";} ?>name="content_delete" value="0" id="content_delete_no" /> <label for="content_delete_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;">&nbsp;</td>
    	      <td class="tdnormal" style="padding-left:15px;">&nbsp;</td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px; font-weight:bold;"><?php echo gettxt("Navigation Area"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation==1) { echo "checked=\"checked\" ";} ?>name="navigation" value="1" id="navigation_yes" /> <label for="navigation_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation==0) { echo "checked=\"checked\" ";} ?>name="navigation" value="0" id="navigation_no" /> <label for="navigation_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Add Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_add ==1) { echo "checked=\"checked\" ";} ?>name="navigation_add" value="1" id="navigation_add_yes" /> <label for="navigation_add_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_add ==0) { echo "checked=\"checked\" ";} ?>name="navigation_add" value="0" id="navigation_add_no" /> <label for="navigation_add_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Rename Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_rename ==1) { echo "checked=\"checked\" ";} ?>name="navigation_rename" value="1" id="navigation_rename_yes" /> <label for="navigation_rename_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_rename ==0) { echo "checked=\"checked\" ";} ?>name="navigation_rename" value="0" id="navigation_rename_no" /> <label for="navigation_rename_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Delete Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_delete ==1) { echo "checked=\"checked\" ";} ?>name="navigation_delete" value="1" id="navigation_delete_yes" /> <label for="navigation_delete_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->navigation_delete ==0) { echo "checked=\"checked\" ";} ?>name="navigation_delete" value="0" id="navigation_delete_no" /> <label for="navigation_delete_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;">&nbsp;</td>
    	      <td class="tdnormal" style="padding-left:15px;">&nbsp;</td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px; font-weight:bold;"><?php echo gettxt("Delete Directory"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung==1) { echo "checked=\"checked\" ";} ?>name="verwaltung" value="1" id="verwaltung_yes" /> <label for="verwaltung_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung==0) { echo "checked=\"checked\" ";} ?>name="verwaltung" value="0" id="verwaltung_no" /> <label for="verwaltung_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Delete Cache"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_cache==1) { echo "checked=\"checked\" ";} ?>name="verwaltung_cache" value="1" id="verwaltung_cache_yes" /> <label for="verwaltung_cache_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_cache==0) { echo "checked=\"checked\" ";} ?>name="verwaltung_cache" value="0" id="verwaltung_cache_no" /> <label for="verwaltung_cache_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Mediamanagement"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_media==1) { echo "checked=\"checked\" ";} ?>name="verwaltung_media" value="1" id="verwaltung_media_yes" /> <label for="verwaltung_media_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_media==0) { echo "checked=\"checked\" ";} ?>name="verwaltung_media" value="0" id="verwaltung_media_no" /> <label for="verwaltung_media_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Settings"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_settings==1) { echo "checked=\"checked\" ";} ?>name="verwaltung_settings" value="1" id="verwaltung_settings_yes" /> <label for="verwaltung_settings_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_settings==0) { echo "checked=\"checked\" ";} ?>name="verwaltung_settings" value="0" id="verwaltung_settings_no" /> <label for="verwaltung_settings_no">Nein</label>
    	      </td>
    	    </tr>
    	    <tr onmouseover="setbgcolor(this, '#eeeeee')" onmouseout="setbgcolor(this, '#ffffff')">
    	      <td class="tdnormal" style="padding:5px;"><?php echo gettxt("Webuser"); ?></td>
    	      <td class="tdnormal" style="padding-left:15px;">
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_webusers==1) { echo "checked=\"checked\" ";} ?>name="verwaltung_webusers" value="1" id="verwaltung_webusers_yes" /> <label for="verwaltung_webusers_yes">Ja</label>
    	        <input type="radio" <?php if($editgroup==1 && $row_edit->verwaltung_webusers==0) { echo "checked=\"checked\" ";} ?>name="verwaltung_webusers" value="0" id="verwaltung_webusers_no" /> <label for="verwaltung_webusers_no">Nein</label>
    	      </td>
    	    </tr>
    	  </table><br />
    	  <input type="submit" value="Speichern" />
    	</form>
    	</div>
    </body>
</html>